extends layout

block content
  h1= title
  p Welcome to #{title}
  -if (user)
    p Hi!
      a(href= "/users/center?username=" + user) #{user}
      a(href= "/users/logout") logout
      a(href='/users/chatRoom') chat room
  -else
    .login-reg
      a(href='/users/login') login
      a(href='/users/reg') register
  h3 The all products
  ol
    each item in prod
      li
        .publisher publisher: #{item.username}
        .name name: #{item.name}
        .description description: #{item.description}
        .price price:￥ #{item.price}元
        .catagory catagory: #{item.catagory}